package com.py.credit.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.py.credit.entity.Model;
import com.py.framework.core.common.Page;

public interface TemplateDao {
	List<Model> getListForPage(@Param(value = "sortType") String sortType, @Param(value = "page") Page page);

	/**
	 * 获取列表
	 * 
	 * @return
	 */
	public List<Map<String, Object>> selectByConditionForPage(@Param(value = "columns") List<String> columns,
			@Param(value = "additionalColumns") String[] additionalColumns,
			@Param(value = "conditions") List<String> conditions, @Param(value = "page") Page page);

	public Map<String, Object> selectOne(@Param(value = "id") String id);

	public int insert(@Param(value = "name") String name, @Param(value = "mainType") String mainType,
			@Param(value = "url") String url, @Param(value = "cjr") String cjr);

	public int update(@Param(value = "name") String name, @Param(value = "mainType") String mainType,
			@Param(value = "url") String url, @Param(value = "id") String id);

	public int del(@Param(value = "ids") List<String> ids);

	public int setStatus(@Param(value = "id") String id, @Param(value = "status") String status);

	public List<Map<String, Object>> listForSelect();

}